package com.jeesite.modules.student.entity;

import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 学生表Entity
 * @author ccz
 * @version 2025-03-20
 */
@Table(name="student", alias="a", label="学生表信息", columns={
		@Column(name="id", attrName="id", label="ID", isPK=true),
		@Column(name="name", attrName="name", label="姓名", queryType=QueryType.LIKE),
		@Column(name="sex", attrName="sex", label="性别"),
		@Column(name="age", attrName="age", label="年龄"),
		@Column(name="jiguang", attrName="jiguang", label="籍贯"),
	}, orderBy="a.id DESC"
)
public class Student extends DataEntity<Student> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 姓名
	private String sex;		// 性别
	private String age;		// 年龄
	private String jiguang;		// 籍贯

	public Student() {
		this(null);
	}
	
	public Student(String id){
		super(id);
	}
	
	@Size(min=0, max=255, message="姓名长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Size(min=0, max=1, message="性别长度不能超过 1 个字符")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@Size(min=0, max=255, message="年龄长度不能超过 255 个字符")
	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}
	
	@Size(min=0, max=255, message="籍贯长度不能超过 255 个字符")
	public String getJiguang() {
		return jiguang;
	}

	public void setJiguang(String jiguang) {
		this.jiguang = jiguang;
	}
	
}